package uk.co.douglashoskins.weathercompare;

import java.io.IOException;

import javax.microedition.lcdui.Image;

public class Assets {
	public static Image VATERSAY;
	public static Image SEARCH_GLOBE;
	public static Image SEARCH_GLOBE_DISABLED;
	public static Image SEARCH_DB;
	public static Image SUN, CLOUD, RAIN, SUNNY_INTERVALS, SNOW, THUNDERSTORM;
	public static Image BBC, WUNDERGROUND, YRNO, YAHOO;
	public static boolean READY = false;
	public static void initialise() {
		new Thread(new Runnable() {
			
			public void run() {
				try {
					VATERSAY = Image.createImage("/res/img/vatersay.jpg");
					SEARCH_GLOBE = Image.createImage("/res/img/search_globe.png");
					SEARCH_GLOBE_DISABLED = Image.createImage("/res/img/search_globe_disabled.png");
					SEARCH_DB = Image.createImage("/res/img/search_db.png");
					SUN = Image.createImage("/res/img/sun.png");
					CLOUD = Image.createImage("/res/img/cloud.png");
					SUNNY_INTERVALS = Image.createImage("/res/img/sunny_intervals.png");
					RAIN = Image.createImage("/res/img/rain.png");
					SNOW = Image.createImage("/res/img/snow.png");
					THUNDERSTORM = Image.createImage("/res/img/thunderstorm.png");
					BBC = Image.createImage("/res/img/bbc.png");
					WUNDERGROUND = Image.createImage("/res/img/wunderground.png");
					YRNO = Image.createImage("/res/img/yrno.png");
					YAHOO = Image.createImage("/res/img/yahoo.png");
				} catch (IOException e) {
					e.printStackTrace();
				}
				READY = true;
				WeatherCompare.c.repaint();
			}
		}).start();
	}
}
